//
//  HomeItem.m
//  Fireball
//
//  Created by 俞渊华 on 2017/12/4.
//  Copyright © 2017年 俞渊华. All rights reserved.
//

#import "HomeItem.h"
#import "HomeBaseViewController.h"

@interface HomeItem ()
@property(nonatomic, strong)HomeBaseViewController * baseVC;
@end

@implementation HomeItem
-(instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {

        
        self.baseVC = [[HomeBaseViewController alloc]init];
        [self addSubview:self.baseVC.view];
        [self.viewController addChildViewController:self.baseVC];
        
    }
    return self;
}
-(void)setMenu:(AticleMenu *)menu{
    _menu = menu;
    self.baseVC.menu = _menu;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    [self.baseVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self);
    }];
}
-(void)drawRect:(CGRect)rect{
    [super drawRect:rect];
}

@end
